package com.nine.gxh.config;

import com.nine.gxh.controller.GxhMessageController;
import com.nine.gxh.service.impl.GxhMessageServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;

import javax.annotation.PostConstruct;

/**
 * @author: duonine
 * @date: 2023/7/3
 */
@Configuration
@MapperScan("com.nine.gxh.mapper")
@Slf4j
@EnableAsync
// 通过 import 导入bean
@Import(value = {GxhMessageServiceImpl.class, GxhMessageController.class})
public class GxhInfoConfig implements InitializingBean {

    @Override
    public void afterPropertiesSet() throws Exception {
        log.info("GxhInfoConfig配置类生效。。。。。。。。。。。。。。");
    }

    @PostConstruct
    public void initconfig() throws Exception {
        log.info("GxhInfoConfig配置类方法initconfig生效。。。。。。。。。。。。。。");
    }

}
